<template>
	<!-- 我的康复师 -->
	<!-- <view class="content">
			<component 
			v-bind:is="courent" 
			></component>
	</view> -->
	<view class="content" v-if="courent=='myMember'">
		<my-member ref="member"></my-member>
	</view>
	<view class="content" v-if="courent=='myRehabilitationCounselor'">
		<my-rehabilitation-counselor ref="adviser"></my-rehabilitation-counselor>
	</view>
	<view class="content" v-if="courent=='myRehabilitation'">
		<my-rehabilitation ref="teacher"></my-rehabilitation>
	</view>
	<view class="content" v-if="courent=='myDoctor'">
		<my-doctor ref="doctor"></my-doctor>
	</view>
</template>

<script>
	import myRehabilitationCounselor from "./components/my-rehabilitation-counselor.vue"
	import myMember from "./components/my-member.vue"
	import myRehabilitation from "./components/my-rehabilitation.vue"
	import myDoctor from "./components/my-doctor.vue"
	export default {
		components: {
			myRehabilitationCounselor,
			myMember,
			myRehabilitation,
			myDoctor
		},
		data() {
			return {
				courent: "myMember"
			}
		},
		onLoad() {
			this.courent = getApp().globalData.activeUrl || "myRehabilitationCounselor"
			console.log('activeUrl', getApp().globalData.activeUrl)

		},
		onPullDownRefresh() {
			console.log("???????????????")
			setTimeout(() => {
				if (this.courent == 'myMember') {
					this.$refs.member.reLoadFn();
				} else if (this.courent == 'myRehabilitationCounselor') {
					this.$refs.adviser.reLoadFn();
				} else if (this.courent == 'myRehabilitation') {
					this.$refs.teacher.reLoadFn();
				} else if (this.courent == 'myDoctor') {
					this.$refs.doctor.reLoadFn();
				}
				uni.stopPullDownRefresh()
			}, 500);

		},
		methods: {

		}
	}
</script>

<style>
</style>